Ext.define('AM.view.dict.Edit', {
    extend: 'Ext.window.Window',
    alias : 'widget.dictedit',

    requires: ['Ext.form.Panel'],

    title : '编辑字典信息',
    layout: 'fit',
    autoShow: true,
    height: 250,
    width: 280,
    initComponent: function() {
        this.items = [
            {
                xtype: 'form',
                padding: '5 5 0 5',
                border: false,
                style: 'background-color: #fff;',
                items: [
                        {xtype: 'hiddenfield', name : 'id',fieldLabel: 'id'},
                        {xtype: 'combobox', name : 'type',fieldLabel: '类型',triggerAction : 'all',queryMode: 'local',editable: false,displayField: 'value', valueField: 'key',store:'dictType'},
                        {xtype: 'textfield', name : 'code',fieldLabel: '代码'},
                        {xtype: 'textfield', name : 'name',fieldLabel: '名称'},
                        {xtype: 'textfield', name : 'pinyin',fieldLabel: '拼音'},
                        {xtype: 'textfield', name : 'description',fieldLabel: '说明'}
                ]
            }
        ];

        this.buttons = [
            {
                text: '保存',
                action: 'save'
            },
            {
                text: '取消',
                scope: this,
                handler: this.close
            }
        ];

        this.callParent(arguments);
    }
});
